﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Role_List.aspx.cs" Inherits="SysManage_Role_List" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
     <link rel="stylesheet" href ="../css/css.css" type="text/css" />
     <script language="javascript" type="text/javascript"  >
function GetRowInfo(obj)
{
 form1.Hobj.value = obj;
 var ary = obj.split('|'); 
 form1.HRoleCode.value = ary[0];   //角色代码 
}

         var tgs; 
         var tmp_background_val; 
         function tog(n,flags)
         { 
            //傳過來本次點擊前的的背景顏色 
            if (tgs){ 
             tgs.style.background= tmp_background_val ; 
            } 
            //考慮到連續點同一個對象的情況,就不要改變保留的顏色 
            n.style.background= '#A7C0F9' ; 
            tmp_background_val=flags;
            tgs=n; 
         } 
         
      function document.onkeydown()
      {
	   if(window.event.keyCode==13)
		{
			var btn=window.document .getElementById ("SearchRoleInfo");
            if(btn!=null)
            {
              btn.focus();
              btn.click();
            }
		}
	 }
</script>
</head>
<body style =" background-image :url('../images/hit_bg.gif');">
<% 
  Response .ExpiresAbsolute=System.DateTime.Now. AddSeconds(-1);
  Response.Expires=0;
  Response.CacheControl = "no-cache";
%>
   <form id="form1" runat="server">
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td>
  	           <table  style ="height :30; " width="100%" border="0" align="center" cellpadding="2" cellspacing="0" >
                <tr> 
                  <td>角色代码&nbsp;<asp:TextBox ID="RoleCode" runat="server" Width="100px"></asp:TextBox>
                      角色名称&nbsp;<asp:TextBox ID="RoleName" runat="server" Width="100px"></asp:TextBox>
                        <input id="SearchRoleInfo" name="Query" type="submit" runat="server"  class="button03" value=" 查 询(F) "  accesskey="f"  onserverclick="SearchRoleInfo_ServerClick" />
                  </td>
                </tr>
              </table>
              </td>
            </tr>
            <tr>
              <td style="height :300;width:100%" valign ="top" >
          <asp:GridView ID="GridView1" runat="server" Width="100%" DataKeyNames="code" OnRowDataBound="GridView1_RowDataBound"
            ForeColor="#333333" AutoGenerateColumns="False" AllowSorting="True" AllowPaging="True"  PageSize="20" EmptyDataText="没搜索到相匹配的数据"  OnSorting="GridView1_Sorting"  BorderColor="#F9F9FB" BorderStyle="Dotted" GridLines="Vertical"  >        
            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="#F9F9FB" />
            <RowStyle BackColor="#F9F9FB" ForeColor="#333333" Height="24px"  BorderStyle="Dotted" />
            <AlternatingRowStyle BackColor="#EFEFF8" />
            <HeaderStyle BackColor="#E3E7F0" Height="25px" />
            <Columns>
                <asp:BoundField DataField="code" HeaderText="角色代码" SortExpression ="code" >
                    <HeaderStyle Width="10%" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="name" HeaderText="角色名称" ReadOnly="True" SortExpression ="name"  >
                    <HeaderStyle Width="30%" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField> 
                <asp:BoundField DataField="Descr" HeaderText="角色描述" SortExpression ="Descr"  >
                    <HeaderStyle Width="50%" />                    
                </asp:BoundField> 
                <asp:BoundField DataField="Effective" HeaderText="是否有效" SortExpression ="Effective"  >
                    <ItemStyle CssClass="hidden" />
                    <HeaderStyle CssClass="hidden" />
                </asp:BoundField>
                <asp:BoundField DataField="GrantInfo" HeaderText="角色授权" SortExpression ="GrantInfo"  >
                    <ItemStyle CssClass="hidden" />
                    <HeaderStyle CssClass="hidden" />
                </asp:BoundField>
	           <asp:TemplateField HeaderText ="是否有效" SortExpression ="code" >
                 <ItemStyle CssClass="hidden" />
                 <HeaderStyle CssClass="hidden" Width="10%" />
	             <ItemTemplate ><%# ListState(DataBinder.Eval(Container.DataItem, "Effective").ToString())%></ItemTemplate>
	           </asp:TemplateField>
            </Columns>
           <PagerSettings FirstPageImageUrl="img/BeginPage.gif" LastPageImageUrl="img/EndPage.gif"
            NextPageImageUrl="img/NextPage.gif" PreviousPageImageUrl="img/PrePage.gif" Mode="NextPreviousFirstLast" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PreviousPageText="上一页" />
            </asp:GridView>
                </td>
            </tr>
            <tr>
              <td align ="right" >共<%=AllCount%>条记录&nbsp;<%=NowPageCount%>/<%= AllPageCount%>页&nbsp;</td>
            </tr>
     </table> 
     <input type="hidden"  id="Hobj" />
     <input type="hidden"  id="HRoleCode" runat ="server"  />
     <asp:Button ID="BtnExport" runat="server"  Text="Button" Width="0px" Height="0px" OnClick="BtnExport_Click" />
        <asp:Button ID="BtnDel" runat="server" Text="Button" Width="0px" Height="0px" OnClick="BtnDel_Click"  />
        <asp:Button ID="BtnDispDel" runat="server" Text="Button" Width="0px" Height="0px" OnClick="BtnDispDel_Click"  />
        <asp:Button ID="BtnHideDel" runat="server" Text="Button" Width="0px" Height="0px" OnClick="BtnHideDel_Click" />
        <asp:Button ID="BtnRefresh" runat="server" Text="Button" Width="0px" Height="0px" OnClick="BtnRefresh_Click"  />
        <asp:Button ID="BtnResume" runat="server" Text="Button" Width="0px" Height="0px" OnClick="BtnResume_Click" />
    </form>
</body>
</html>
